The present invention relates to a variable displacement motor and, more particularly, to a motor that converts longitudinal motion to rotary motion. A piston simultaneously reciprocates longitudinally along a drive shaft and rotates back and forth as the piston reciprocates. The turning rotary motion of the piston operates a ratchet with a sprague clutch that turns the drive shaft. By the use of multilayered pistons and multiple sprague clutches, the drive shaft can be turned during both directions of longitudinal and rotary movement of the piston.